<?php include THEMES_PATH.'public/before_body2.phtml';?>
<link href="/statics/front/css/index.css?v=20160125" rel="stylesheet">
</head>
<body>
<?php include THEMES_PATH.'public/header2.phtml';?>
<style type="text/css">
  .activity_banner{line-height: 0;}
  .activity_banner >a{display: block; width: 100%;}
  .activity_banner >a img{width: 100%;}
  .m_activity >a{display: block; width: 100%;}
  .m_activity >a img{width: 100%;}
  @media (max-width: 1279px){
    .activity_banner{display: none;}
  }
  @media (min-width: 1279px){
    .m_activity{display: none;}
  }
  .carousel-control-prev, .carousel-control-next {
    position: absolute;
    top: 0;
    left: 0;
    width: 10%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    cursor: pointer;
}
.carousel-control-prev {
    background-image: url();
}
.carousel-control-next {
    right: 0;
    left: auto;
    background-image: url();
}
</style>

<div class="activity_banner">
  <div class="ovh rel align-center carousel-box">
    <div class="ovh carousel js-carousel">
      <ul class="rel">
        <?php foreach ($slideList as $k=>$v):?>
        <li class="rel">
          <?php if(!$mobile){?>
          <img src="<?php echo $v['img']?>" alt="<?php echo $v['alt']?>" class="vm">
          <?php }else{?>
          <img src="<?php echo $v['imgm']?>" alt="<?php echo $v['alt']?>" class="vm">
          <?php }?>
          <a href="<?php echo $v['url']?>" target="_balnk"></a>
        </li>
        <?php endforeach;?>
      </ul>
    </div>
    <span class="carousel-control-prev js-carousel-control-prev" data-jcarouselcontrol="true"></span>
    <span class="carousel-control-next js-carousel-control-next" data-jcarouselcontrol="true"></span>
    <p class="carousel-pagination js-carousel-pagination"></p>
  </div>
</div>

<div class="ovh rel align-center carousel-box m_activity">
  <div class="ovh carousel js-carousel">
    <ul class="rel">
      <?php foreach ($slideList as $k=>$v):?>
      <li class="rel">
        <?php if(!$mobile){?>
        <img src="<?php echo $v['img']?>" alt="<?php echo $v['alt']?>" class="vm">
        <?php }else{?>
        <img src="<?php echo $v['imgm']?>" alt="<?php echo $v['alt']?>" class="vm">
        <?php }?>
        <a href="<?php echo $v['url']?>" target="_balnk"></a>
      </li>
      <?php endforeach;?>
    </ul>
  </div>
  <p class="carousel-pagination js-carousel-pagination"></p>
</div>
<div class="homepage-grid clearfix">

        <div class="grid-item" >
            <span class="slot-title">最受欢迎</span>
            <span class="slot-subtitle">热销No.1单品</span>
            <div class="slot-image-wrap" >
                <a href="/product/all/src/aHR0cDovL3d3dy5vd25vbmx5LmNuL3Byb2R1Y3QvYWxs"  target="_blank"><img class="slot-image" data-img="/statics/front/images/index/58f8f75884915.jpg" data-lazyload="" alt="" src="/statics/front/images/index/58f8f75884915.jpg"></a>
            </div>

                            <a href="/product/all/src/aHR0cDovL3d3dy5vd25vbmx5LmNuL3Byb2R1Y3QvYWxs" target="_blank" class="btn slot-btn">SHOP NOW</a>
        </div>


        <div class="grid-item " >
            <span class="slot-title">西服套装</span>
            <span class="slot-subtitle">100+道工序，10000+针脚，100%合身追求</span>
            <div class="slot-image-wrap" >

                <a href="/category/2093-two-piece-suits"  target="_blank"><img class="slot-image" data-img="/statics/front/images/index/5a26f2608d5f6.jpg" data-lazyload="" alt="" src="/statics/front/images/index/5a26f2608d5f6.jpg"></a>
            </div>

                            <a href="/category/2093-two-piece-suits" target="_blank" class="btn slot-btn">SHOP NOW</a>
                    </div>

        <div class="grid-item " >
            <span class="slot-title">衬衫定制</span>
            <span class="slot-subtitle">定制体验，从一件OWNONLY衬衫开始</span>
            <div class="slot-image-wrap" >
                <a href="/category/2062-shirts"  target="_blank"><img class="slot-image" data-img="/statics/front/images/index/59ee206d27ec6.jpg" data-lazyload="" alt="" src="/statics/front/images/index/59ee206d27ec6.jpg"></a>
            </div>
                   <a href="/category/2062-shirts" target="_blank" class="btn slot-btn">SHOP SHIRTS</a>
          </div>


        <div class="grid-item  " >
            <span class="slot-title">绅士鞋履</span>
            <span class="slot-subtitle">手工缝制，复古擦色，致敬经典</span>
            <div class="slot-image-wrap" >
                <a href="/category/2163-shoes"  target="_blank"><img class="slot-image" data-img="/statics/front/images/index/579b9fa4cc8f3.jpg" data-lazyload="" alt="" src="/statics/front/images/index/579b9fa4cc8f3.jpg"></a>
            </div>

             <a href="/category/2163-shoes" target="_blank" class="btn slot-btn">SHOP SHOES</a>
           </div>

        <div class="grid-item grid-item-large-PC " >
            <span class="slot-title">定制单西</span>
            <span class="slot-subtitle">完美面料，为你定制</span>
            <div class="slot-image-wrap" >
                <img class="slot-image" data-img-1260="/statics/front/images/index/blazers.jpg" data-lazyload="" alt="" src="/statics/front/images/index/blazers.jpg"  >
            </div>

             <a href="/category/2104-blazers" class="btn slot-btn">SHOP NOW</a>
           </div>

        <div class="grid-item grid-item-large-PC " >
            <span class="slot-title">全民婚礼</span>
            <span class="slot-subtitle">一生一世，一人一版，only for you，一起见证“！”时刻</span>
            <div class="slot-image-wrap" >
                <a href="/groupBuying/wedding/index"  target="_blank"><img class="slot-image" data-img-1260="/statics/front/images/index/56e86ec177e82.jpg" data-lazyload="" alt=""  src="/statics/front/images/index/56e86ec177e82.jpg"></a>
            </div>

             <a href="/groupBuying/wedding/index" target="_blank" class="btn slot-btn">SHOP NOW</a>
           </div>


             <!--这下面是移动端的主题活动版块，-PC隐藏-->
            <div class="grid-item grid-item-large " >
            <span class="slot-title">定制单西</span>
            <span class="slot-subtitle">完美面料，为你定制</span>
            <div class="slot-image-wrap" >
                <img class="slot-image" data-img-1260="/statics/front/images/index/blazers2.jpg" data-lazyload="" alt=""  src="/statics/front/images/index/blazers2.jpg">
            </div>

             <a href="/category/2104-blazers" class="btn slot-btn">SHOP NOW</a>
           </div>


             <div class="grid-item grid-item-large " >
            <span class="slot-title">全民婚礼</span>
            <span class="slot-subtitle">一生一世，一人一版，only for you，一起见证“！”时刻</span>
            <div class="slot-image-wrap" >
                <a href="/groupBuying/wedding/index"  target="_blank"><img class="slot-image" data-img-1260="/statics/front/images/index/56e86ec177e82.jpg" data-lazyload="" alt=""  src="/statics/front/images/index/254651esffd.jpg"></a>
            </div>

             <a href="/groupBuying/wedding/index" target="_blank" class="btn slot-btn">SHOP NOW</a>
           </div>


           <!--这下面是PC端的定制视频版块，-移动端隐藏-->
           <div class="grid-item mobile-hidden " >
            <span class="slot-title">衬衫的诞生</span>
            <span class="slot-subtitle">匠心探索频道： 一件ownonly定制衬衫的诞生</span>
            <div class="slot-image-wrap" >
                <a data-toggle="modal" data-target="#movie" href=""> <img class="slot-image" data-img="/statics/front/images/index/582632432f480.jpg" data-lazyload="" alt="" src="/statics/front/images/index/582632432f480.jpg">
                </a>
            </div>

             <a data-toggle="modal" data-target="#movie" href=""> <div class="btn slot-btn ">WATCH VIDEO</div></a>
           </div>



          <!--这下面是PC端的定制视频打开弹窗，-->
          <div id="movie" class="modal fade" tabindex="-1">

            <div class="modal-content">
                <div class="modal-body">
                     按ESC退出
                    <button class="close" data-dismiss="modal">
                        <span>&times;</span>
                    </button>
                </div>
                <div class="modal-title">
                    <h1 class="text-center">一件定制衬衫的诞生！</h1>
                </div>
               <div class="movie_wrap">
                    <video width="780" height="460" controls style="margin:0 10px 0 10px">
                       <source src="/statics/front/images/index/shirt.mp4" type="video/mp4">
                        <source src="movie.ogg" type="video/ogg">
                         <source src="movie.webm" type="video/webm">
                         <object data="movie.mp4" width="780" height="600">
                         <embed src="movie.swf" width="780" height="600">
                         </object>
                    </video>
              </div>
            </div>
          </div>

          <!--视频VIDEO窗口END-->

          <!--视频窗口样式-->
           <style>
			   .modal{background: rgba(0, 0,0, .8)}
			   .modal-content{width: 800px; height: 580px;;position:relative;left: 50%;top: 50%;margin:-300px -400px}
			   .modal-title h1{font-size: 20px; text-align: center;margin: 0;}

	       </style>

           <!--这下面是移动端的企业形象版块，-PC端隐藏-->
            <div class="grid-item pc-hidden " >
            <span class="slot-title">企业团购</span>
            <span class="slot-subtitle">专业造型，企业文化提炼，助力独一无二的团队风貌</span>
            <div class="slot-image-wrap" >
                <img class="slot-image" data-img="/statics/front/images/index/qiye-mobile.jpg" data-lazyload="" alt="" src="/statics/front/images/index/qiye-mobile.jpg">
            </div>

             <a href="/collection/suits" class="btn slot-btn">OWNONLY</a>
           </div>



        <!--这下面是PC端的企业形象版块，移动端隐藏-->
         <div class="wrapper mobile-hidden">
         <div class="homeAdds">
        <a href="/groupBuying/group"><img src="/statics/front/images/index/img12.jpg"></a>
        <div class="homeAdds_btn">
            <a href="/groupBuying/group">OWNONLY</a>
        </div>
       </div>
        </div>

</div>


<div class="align-center pt1x pb1x toolbar js-toolbar">
  <a href="<?php echo url('/schedule');?>" class="col-md-4">预约量体</a>
  <?php if($mobile){?>
  <a href="<?php echo url('/product/product_mobile');?>" class="col-md-4">3D试衣间</a>
  <?php }else{?>
  <a href="<?php echo url('/product/all');?>?fullscreen" class="col-md-4">3D试衣间</a>
  <?php }?>
  <a href="<?php echo url('/special/referFriend');?>" class="col-md-4 last">推荐好友</a>
</div>
<div class="coupon-popup-bg<?php if(!$coupon_code) echo ' hide';?> js-coupon-mask"></div>
<div class="coupon-popup<?php if(!$coupon_code) echo ' hide';?> js-coupon-popup">
  <img src="/statics/front/images/index/bg-coupon.jpg" alt="suits" />
  <p class="title"><?php echo $refer_getitnow_title;?></p>
  <ol>
    <li><?php echo L('refer_getitnow_1');?></li>
    <li><?php echo L('refer_getitnow_2');?></li>
    <li><?php echo L('refer_getitnow_3');?></li>
  </ol>
  <p class="coupon-code"><?php echo L('refer_coupon_code')?>: <em><?php echo $coupon_code;?></em></p>
  <p>
    <a href="<?php echo url('category/2093-two-piece-suit');?>" class="btn"><?php echo L('refer_shop_now');?></a>
  </p>
</div>
<div class="mask js-register-mask<?php if($is_gift==1 || $recharge == 1){echo ' show';};?>"></div>
<div class="popup-box login-reg-popup js-register-popup<?php if(isset($is_gift) && !$recharge){echo ' show';};?>">
  <i class="close js-close">×</i>
  <div class="col-md-6">
    <strong class="title align-center mb1x"><?php echo L('login');?></strong>
    <form action="<?php echo url('user/login',array('src'=>  base64_encode(url('gift/giftcard')))); ?>" id="loginForm" method="post">
      <div class="mb1x">
        <input type="text" name="username" id="loging_user_name" placeholder="<?php echo L('login_name');?>" alt="<?php echo L('inputusername');?>">
      </div>
      <div class="mb1x">
        <input type="password" name="password" id="loging_password" placeholder="<?php echo L('login_passwd');?>" alt="<?php echo L('passwd_validate');?>">
      </div>
      <div class="clearfix mb1x">
        <label class="pull-left remember">
          <input type="checkbox" checked="checked" />
          <span><?php echo L('_Remember_Me_');?></span>
        </label>
        <a href="<?php echo url('user/getpassword');?>" rel="nofollow" class="pull-right forgot-password"><?php echo L('get_passwd');?></a>
      </div>
      <input type="hidden" name="src" value="<?php echo isset($src) ? $src : null;?>" />
	  <input type="hidden" name="goback" value="<?php echo $http;?>" />
      <input type="submit" name="dosubmit" value="<?php echo L('login');?>" class="btn btn-middle" />
    </form>
  </div>
  <div class="col-md-6">
    <strong class="title align-center mb1x"><?php echo L('register_login');?></strong>
    <form name="registerForm" method="post" action="<?php echo url('user/register',array('src'=>  base64_encode(url('gift/giftcard')))); ?>" id="registerForm" autocomplete="off">
      <div class="mb1x">
        <input type="text" name="email" id="email" placeholder="<?php echo L('login_email');?>">
      </div>
      <div class="mb1x">
        <input type="text" name="phone" id="phone" placeholder="<?php echo L('login_phone');?>">
      </div>
      <div class="mb1x">
        <input type="password" name="password" id="password" placeholder="<?php echo L('login_passwd');?>">
      </div>
      <div class="mb1x">
        <input type="password" name="confirm_password" id="confirm_password" placeholder="<?php echo L('confirm_password');?>">
      </div>
      <div class="clearfix mb1x">
        <label class="pull-left remember">
          <input type="checkbox" name="is_email" id="check" checked />
          <span><?php echo L('join_our_mailing');?></span>
        </label>
      </div>
      <input type="hidden" name="src" id="src" value="<?php echo isset($src) ? $src : null; ?>">
      <input type="submit" name="dosubmit" value="<?php echo L('submit');?>" class="btn btn-middle">
    </form>
  </div>
</div>
<div class="align-center popup-box gift-card-popup js-gift-card-popup<?php if($recharge == 1){echo ' show';};?>">
  <i class="close js-close">×</i>
  <strong class="title" style="display:block;"><?php echo L('gift_card_explain_title');?></strong>
  <p class="align-left" style="display:inline-block;width:62%;"><?php echo L('gift_card_explain');?></p>
  <p>
    <label class="gift-code"><?php echo L('gift_card');?>: <input type="text" /></label>
  </p>
  <p>
    <button type="button" class="btn btn-middle"><?php echo L('submit');?></button>
  </p>
</div>
<?php include THEMES_PATH.'public/footer2.phtml';?>
<script src="/statics/front/js/plugins/carousel/jquery.jcarousel.min.js"></script>
<script src="/statics/front/js/plugins/carousel/jquery.jcarousel-swipe.min.js"></script>
<script>
$(function() {
  //根据屏幕的大小加载图片
  function each(e){
    $(e).each(function(index, el) {
      var rel=$(this).find('img').attr("rel");
      $(this).find('img').attr("src",rel);
    });
  }
  if(screen.width>=1280){
    each(".activity_banner");
  }else{
    each(".m_activity");
  }
  $(window).resize(function(){
    if($(window).width()<1280){
      each(".m_activity");
    }
  })
  var $document = $(document),
      $window = $(window);

  (function() {// 轮播图处理
    $('.js-carousel')
      .on('jcarousel:create jcarousel:reload', function () {
        var $this = $(this),
            width = $this.innerWidth(),
            height = $this.height();
        $this.jcarousel('items').width(width);
      })
      .jcarousel({
        auto: true,
        wrap: 'circular'
      })
      .jcarouselAutoscroll({
        autostart: true,
        interval: 5000,
        target: '+=1'
      })
      .jcarouselSwipe();

    $('.js-carousel-control-prev')
      .on('jcarouselcontrol:active', function() {
        $(this).removeClass('inactive');
      })
      .on('jcarouselcontrol:inactive', function() {
        $(this).addClass('inactive');
      })
      .jcarouselControl({
        target: '-=1'
      });

    $('.js-carousel-control-next')
      .on('jcarouselcontrol:active', function() {
        $(this).removeClass('inactive');
      })
      .on('jcarouselcontrol:inactive', function() {
        $(this).addClass('inactive');
      })
      .jcarouselControl({
        target: '+=1'
      });

    $('.js-carousel-pagination')
      .on('jcarouselpagination:active', 'a', function() {
        $(this).addClass('active');
      })
      .on('jcarouselpagination:inactive', 'a', function() {
        $(this).removeClass('active');
      })
      .jcarouselPagination();
  })();

  (function() {
    var $toolbar = $('.js-toolbar').filter(':visible');

    $window.on('scroll', function () {
      if ( $document.height() === $(this).scrollTop() + $(this).height() ) {
        $toolbar.fadeOut();
      } else {
        $toolbar.fadeIn();
      }
    });

    /*feedback form控件验证*/
    function feedbackValidate(form){
      var $submit = $('button[type=submit]', form);
      if ($submit.attr('disabled') === 'disabled') {
        return false;
      }

      $.ajax({
        url: '/index/feedback',
        type: 'POST',
        data: {'email': $('input[name=email]', form).val(), 'message': $('textarea[name=message]', form).val()}
      }).done(function(response) {
        var feedbackData = $.parseJSON(response),
            status = feedbackData.errno,
            msg = feedbackData.errstr,
            $remoteMsg = $('.js-remote-msg', form);
        if (status === 1) {
          if ($remoteMsg.length === 0) {
            $('.js-field-box', form).append('<p class="valid js-remote-msg">'+ msg +'</p>');
            $remoteMsg = $('.js-remote-msg', form);
          } else {
            $remoteMsg.addClass('valid').removeClass('error').text(msg).show();
          }
          $submit.attr('disabled', 'disabled');
          setTimeout(function () {
            $(".field-box", form)[0] && $(".field-box", form).addClass('hide');
            $(':input', form).not('button').val('');
            $remoteMsg.hide();
            $submit.removeAttr('disabled');
          }, 2000);
        } else if (status === 0) {
          if ($remoteMsg.length === 0) {
            $('.js-field-box', form).append('<p class="error js-remote-msg">'+ msg +'</p>');
          } else {
            $remoteMsg.addClass('error').removeClass('valid').text(msg).show();
          }
        }
      });
    }

    $('#feedback').validate({
      errorElement: 'p',
      submitHandler: function(form) {
        feedbackValidate(form);
      },
      errorPlacement: function(error, element) {
        element.after(error);
      },
      rules: {
        email: {
          required: true,
          email: true
        },
        message: 'required'
      },
      messages: {
        email: {
          required: "<?php echo L('input_email_addres');?>",
          email: "<?php echo L('_EMAIL_FORMAT_ERROR_');?>"
        },
        message: "<?php echo L('please_enter_opinions');?>"
      }
    });
  })();

  (function() {/* 优惠码弹出框 */
    $('.js-coupon-mask').height($document.height());
    position.fixPosition($('.js-coupon-popup'));
    $window.on('resize', function() {
      $('.js-coupon-mask').height($document.height());
      position.fixPosition($('.js-coupon-popup'));
    });
  })();

  (function() {/* giftCard弹出框 */
    var $giftCardPopup = $('.js-gift-card-popup');
    var $registerPopup = $('.js-register-popup');

    $('.js-register-mask').height($document.height());
    position.fixPosition($registerPopup);
    position.fixPosition($giftCardPopup);

    $window.on('resize', function() {
      $('.js-register-mask').height($document.height());
      position.fixPosition($registerPopup);
      position.fixPosition($giftCardPopup);
    });

    /*关闭弹窗*/
    $giftCardPopup.on("click",".js-close", function () {
      $giftCardPopup.add(".js-register-mask").removeClass("show").addClass("hide");
    });
    $registerPopup.on("click",".js-close", function () {
      $registerPopup.add(".js-register-mask").removeClass("show").addClass("hide");
    });

    $giftCardPopup.find('button').on('click', function() {
      var $giftCode = $giftCardPopup.find('input[type=text]'),
          $giftCodeParent = $giftCode.parent(),
          $error = $giftCodeParent.next('.error'),
          $success = $giftCodeParent.next('.success'),
          giftCode = $giftCode.val();
      if (/^\s*$/.test(giftCode)) {
        if ($error.length === 0) {
          $giftCodeParent.after('<span class="error"></span>');
        } else {
          $error.text('');
        }
      } else {
        $.ajax({
          url: '/gift/recharge/code/'+ giftCode,
          type: 'GET',
          dataType: 'json'
        })
        .done(function(response) {
          if (response.return_no == 0) {
            if ($error.length === 0) {
              $giftCodeParent.after('<span class="error"><?php echo L('gift_user_account_validate_0');?></span>');
            } else {
              $error.text('<?php echo L('gift_user_account_validate_0');?>');
            }
            $success.remove();
          } else if (response.return_no == 2) {
            if ($error.length === 0) {
              $giftCodeParent.after('<span class="error"><?php echo L('gift_user_account_validate_2');?></span>');
            } else {
              $error.text('<?php echo L('gift_user_account_validate_2');?>');
            }
            $success.remove();
          } else if (response.return_no == 1) {
            if ($success.length === 0) {
              $giftCodeParent.after('<span class="success"><?php echo L('gift_user_account_validate_1');?></span>');
            } else {
              $success.text('<?php echo L('gift_user_account_validate_1');?>');
            }
            $error.remove();
            setTimeout(function() {
              window.location.href = '<?php echo url(CATEGORY_URL_2093);?>';
            }, 1000);
          }
        })
        .fail(function() {
          if ($error.length === 0) {
            $giftCodeParent.after('<span class="error">' + networkError + '</span>');
          } else {
            $error.text(networkError);
          }
          $success.remove();
        });
      }
    });

    $('#loginForm').validate({
      errorElement: 'p',
      submitHandler: function(form) {
        form.submit();
      },
      errorPlacement: function(error, element) {
        element.after(error).css('color', '#fff').prev().css('color', '#fff');
        element.next().css('color', '#777');
      },
      success: function(label) {
        label.siblings().first().removeAttr('style');
      },
      rules: {
        username: {
          required: true,
          isMobileOrEmail: true
        },
        password: {
          required: true,
          rangelength: Array(6, 20)
        }
      },
      messages: {
        username: {
          required: "<?php echo L('input_email_addres');?>",
          email: "<?php echo L('_EMAIL_FORMAT_ERROR_');?>"
        },
        password: {
          required: "<?php echo L('input_login_passwd');?>",
          rangelength: "<?php echo L('_THE_PASSWORD_SHOULD_BE_BETWEEN_6_20_');?>"
        }
      }
    });

    $("#registerForm").validate({
      errorElement: 'p',
      submitHandler: function(form) {
        form.submit();
      },
      errorPlacement: function(error, element) {
        element.after(error);
      },
      rules: {
        email:{
          required: true,
          email: true,
          remote: {
            url: "<?php echo url('user/validate_email_ajax')?>",
            type: "post",
            dataType: "json",
            data: {
              email:function(){
                return $("#email").val();
              }
            }
          }
        },
        phone: {
          required: true,
          remote: {
            url: '/user/validate_phone_ajax',
            type: 'post',
            dataType: 'json',
            data: {
              email: function() {
                return $('#phone').val();
              }
            }
          }
        },
        password: {
          required: true,
          minlength: 6
        },
        confirm_password: {
          required: true,
          minlength: 6,
          equalTo: "#password"
        },
        register_vcode:'required'
      },
      messages: {
        first_name: {
          required: "<?php echo L('inputfristname');?>"
        },
        last_name: {
          required: "<?php echo L('inputlastname');?>"
        },
        email: {
          required: "<?php echo L('input_login_email');?>",
          email: "<?php echo L('_EMAIL_FORMAT_ERROR_');?>",
              remote: $.format("{0}")
        },
        password: {
          required: "<?php echo L('input_login_passwd') ?>",
          minlength: $.format("<?php echo L('_THE_PASSWORD_SHOULD_BE_BETWEEN_6_20_');?>")
        },
        confirm_password: {
          required: "<?php echo L('input_login_pw2');?>",
          minlength: $.format("<?php echo L('_THE_PASSWORD_SHOULD_BE_BETWEEN_6_20_');?>"),
          equalTo: "<?php echo L('password_not_match');?>"
        },
        register_vcode:'Enter verification code'
      }
    });
  })();

  $('.js-scroll-down').on('click', function () {
    var $this = $(this),
        top = $this.next()[0] ? $this.next().offset().top : $this.parent().offset().top;
    $('html, body').animate({'scrollTop': top}, 200);
  });
});
</script>
<?php include THEMES_PATH.'public/after_body.phtml';?>